﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace BPM.Web.Shared.Data;

/// <summary>
/// 邮件
/// </summary>
[DisplayName("邮件")]
public class EmailInput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    [DisplayName("标题")]
    [MaxLength(30)]
    public string? Title { get; set; }

    /// <summary>
    /// 接收者
    /// </summary>
    [DisplayName("接收者")]
    [MaxLength(50)]
    public string? Recipient { get; set; }

    /// <summary>
    /// 是否HTML邮件
    /// </summary>
    public bool IsHtml { get; set; }

    /// <summary>
    /// 内容
    /// </summary>
    public string? Content { get; set; }
}

